<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background:red;
            margin-bottom:10px;
        }
    </style>
    <script src="jquery-3.2.0.min.js"></script>
    <script>
       $(function(){
           $('a').click(function(){
                       $(this).parent().remove()
                   }
           )
       })
    </script>
</head>
<body>
<input type="text" id="box2">
<input type="button" value="哈哈哈" id="box">
<ul>
    <li>1 <a href="javascript:;">删除</a></li>
    <li>3<a href="javascript:;">删除</a></li>
    <li>1 <a href="javascript:;">删除</a></li>
    <li>3<a href="javascript:;">删除</a></li>
    <li>1 <a href="javascript:;">删除</a></li>
    <li>3<a href="javascript:;">删除</a></li>
    <li>1 <a href="javascript:;">删除</a></li>
    <li>3<a href="javascript:;">删除</a></li>
</ul>
</body>
</html>